package day03;

import java.sql.SQLOutput;

public class HomeWork {
    public static void main(String[] args) {
        /*
        System.out.println(5%2);
        System.out.println(8%2);
        System.out.println(2%8);
        int a =5,b=5;
        a++;
        ++b;
        System.out.println(a);
        System.out.println(b);

         */
        /*
        int a =5, b =5;
        int c=a++;
        int d=++b;
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
        System.out.println(d);


         */

        /*
        int a =5,b=5;
        int c =a--;
        int d =--b;
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
        System.out.println(d);


         */
       /*
        int a =5,b =10, c =5;
        boolean b1=b>a;
        System.out.println(b1);
        System.out.println(c<b);
        System.out.println(a>=c);
        System.out.println(b<=a);
        System.out.println(b==c);
        System.out.println(a!=c);
        System.out.println(a+c>10);
        System.out.println(b%2==0);
        System.out.println(c++>5);
        System.out.println(c++>5);


        */

        /*
        int a =5,b=10,c=5;
        boolean b1 =b>=a&& b<c;
        System.out.println(b1);
        System.out.println(b<=c && b>a);
        System.out.println(a==b && c>b);
        System.out.println(b!=c && a<b);
        System.out.println(b>=a || b<c);
        System.out.println(b<=c||b>a);
        System.out.println(b!=c || a<b);
        System.out.println(a==b || c>b);
        boolean b2 =!(a<b);
        System.out.println(b2);
        System.out.println(!(a>b));


         */
        /*
        int a =5,b =10,c =5;
        boolean b3 =a>b && c++>2;
        System.out.println(b3);
        System.out.println(c);
        boolean b4 = a<b || c++>2;
        System.out.println(b4);
        System.out.println(c);


         */
        /*
        int a =5;
        a+=10;
        System.out.println(a);
        a*=2;
        System.out.println(a);
        a/=6;
        System.out.println(a);
        short s =5;
        s+=10;
        int age =38;
        System.out.println("age=");
        System.out.println(age);
        System.out.println("age="+age);
        System.out.println("我的年龄是"+age);
        System.out.println("我今年"+age+"岁了");
        String name="WKJ";
        System.out.println("name="+name);
        System.out.println("大家好,我叫"+name);
        System.out.println("大家好，我叫"+name+"，今年"+age+"岁了");
        System.out.println(10+20+""+30);
        System.out.println(""+10+20+30);
        System.out.println(10+20+30+"");


         */
        /*
        int num =5;
        int flag =num>0?1:-1;
        System.out.println(flag);

        int a =8, b=5;
        int max =a>b?a:b;
        System.out.println("max="+max);


         */
        /*
        double price =300.0;
        if(price>=500){
            price*=0.8;

        }
        System.out.println("最终消费金额为："+price);
        int score =555;
        if (score>=0 && score<=100){
            System.out.println("成绩合法");

        }
        System.out.println("继续执行");



         */

        /*
        double price =300.0;
        if (price>=500){
            price*=0.8;

        }else{price*=0.9;
        }
        System.out.println("最终消费金额为："+price);
        int score =95；



         */
        /*
        int score =95；
        if (score>=0 && score<=100){
            System.out.println(score+"是合法成绩");
        }else {
            System.out.println(score+"是不合法成绩");

        }



         */
        double price=6000.0;
        if (price>=2000){price*=0.5;

        }else if (price>=1000){price*=0.7;

        }else if (price>=500){price*=0.8;

        }else{price*=0.9;

        }
        System.out.println("最终消费金额为："+price);








































    }
}
